import java.util.Scanner;

public class demo04 {
    //积木画
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        long[] arr=new long[10000000];
        arr[0]=1;
        arr[1]=1;
        arr[2]=2;
        for (int i = 3; i <= n; i++) {
            arr[i]=(arr[i-1]*2+arr[i-3])%1000000007;
        }
        System.out.println(arr[n]);
    }
}